home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Dialog / DLL / MakeDLL < prev    next >
Text File  |  1995-07-08  |  3KB  |  138 lines

  1.  
  2. ObjectFiles    =        \
  3.             o.CreatDstry    \
  4.             o.Hide    \
  5.             o.Show    \
  6.             o.ShowAt    \
  7.             o.ShowStatic    \
  8.             o.Wait4Click    \
  9.  
  10.  
  11. LibName        =    Dialog
  12.  
  13.  
  14.  
  15. # Template makefile to make Straylight Dynamic Link 
  16. # Library from a DeskLib sublibrary's .o files
  17. #
  18. # The DLL is made in the directory 
  19. # '<DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.'
  20. # and has the same name as the DeskLib sublibrary.
  21. #
  22. # Julian Smith 17 Apr 1995.
  23.  
  24. # The macro $(ObjectFiles) should be set at the 
  25. # start of this file, to be a space-separated
  26. # list of object files.
  27. # This is done by 'Makatic'.
  28.  
  29. # The macro $(LibName) should also be set at the 
  30. # start of this file, to be the name of the 
  31. # DeskLib sublibrary.
  32. # This is done by 'Makatic'.
  33.  
  34. # Note that this makefile doesn't use cc at all
  35. # - it merely links existing .o files.
  36.  
  37. # Linker flags, These can be anything. 
  38. # All flags required by Straylight (eg Link -rmf) 
  39. # are included in the $(LINK) macro.
  40. #
  41. LinkFlags    =    $(LinkExtra)
  42.  
  43.  
  44. # Macros for commands, including the Straylight
  45. # tool 'cdll'. Note that DRLink doesn't seem to
  46. # work with the SDLS.
  47. #
  48. LINK        =    Link -rmf
  49. CDLL        =    cdll
  50.  
  51.  
  52. # Filename of the thing we need to make: - the main
  53. # dynamically-linked library, which will go in the 
  54. # !DLL application.
  55. # NB The leafname of $(DLL_Lib) file (after copying into the !DLL
  56. # application) should be the same as the 'name' field in the
  57. # $(DLL_Def) file. In this case, this is $(LibName).
  58. DLL_Lib        =    <DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.$(LibName)
  59.  
  60.  
  61. # Filenames of intermediate files needed to make $(DLL_Lib) and $(DLL_Stubs).
  62. #
  63. DLL_Header    =    Header
  64. DLL_Def        =    ^.DLLDef
  65. DLL_Stubs    =    Stubs
  66.  
  67.  
  68.  
  69. # -------------------------------------------------------
  70. # Everything below here should probably not be changed...
  71. # -------------------------------------------------------
  72.  
  73.  
  74. # Extra libs, written by Straylight, which always need to be linked into a DLL
  75. #
  76. SDLS_ExtraObjects=                    \
  77.             C:DLLLib.o.DLLLib        \
  78.             C:DLLLib.o.dstubs        \
  79.  
  80.  
  81. # Extra DeskLib libraries which need to be linked into the final DLL.
  82. # The DLL DeskLib library is included here because some DeskLib DLLs may
  83. # refer to other DeskLib DLLs.
  84. # Note that DeskLib:o.DLL contains all the DLL.o.* files except for 
  85. # the sublibraries for which there is a DLL - just the DLL Stubs file
  86. # is included for these.
  87. #
  88. DeskLib_ExtraObjects=                \
  89.             DeskLib:o.DLLDLL    \
  90.  
  91.  
  92.  
  93.  
  94. #Here's what we want to make...
  95.  
  96. All:    $(DLL_Lib)
  97.  
  98. $(DLL_Lib):    $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header) $(ObjectFiles)
  99.     $(LINK) $(LinkFlags) -o $@ $(ObjectFiles) $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header)
  100.  
  101.  
  102.  
  103. # Here's how to make the things which are needed in the above rules
  104.  
  105. $(DLL_Def):    
  106.     | Error: No DLL definition file exists.
  107.     |        You should run th MkStubsOs makefile
  108.     |        and then alter the template Def
  109.     |        file by hand.
  110.  
  111. $(DLL_Header):    $(DLL_Def)
  112.     $(CDLL) -def $(DLL_Def) -hdr $(DLL_Header)
  113.  
  114.  
  115. # Rule for compiling C source code for a Straylight dynamically-linked library.
  116. # Actually, we don't call cc - we complain and tell the user to run the 
  117. # MkStubsOs makefile.
  118.  
  119. VPATH = @.^
  120.  
  121. .SUFFIXES:    .o .c .s
  122. .c.o:
  123.     | $@ needs recompiling. This should be done by
  124.     | running the MkStubsOs or MkOs makefile before running
  125.     | this makefile.
  126.     |
  127.  
  128. .s.o:
  129.     | $@ needs assembling. This should be done by
  130.     | running the MkStubsOs or MkOs makefile before running
  131.     | this makefile.
  132.     |
  133.  
  134.  
  135.  
  136. # Dynamic dependencies:
  137.